﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MvcETicaretDenemesi.Models
{
    public class IndexLists
    {
        EDBDataContext DB = new EDBDataContext();

        public IEnumerable<Category> CategoryListe { get; set; }
        public IEnumerable<Product> ProductListe { get; set; }
        public IEnumerable<Banner> BannerListe { get; set; }
        public Product UrunGetir(short KategoriId)
        {
            Product selectedProduct = DB.Products.Where(a => a.CategoryId == KategoriId).FirstOrDefault();
            return selectedProduct;
        }
    }
}